package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.javaBean.ChangePwdBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * author: FHP
 * data: on 2018\1\12 0012 14:43
 * E-Mail: 103945089@qq.com
 */
class ChangePwdModule {
    interface ChangePWDListener{
        fun startChangeing()
        fun changeOver(changePwdBean: ChangePwdBean)
    }

    fun changePwd(params: HttpParams,listener:ChangePWDListener){
        UrlApis.changePwd(params)
                .doOnSubscribe {
                    listener.startChangeing()
                }
                .subscribe {
                    data->
                    listener.changeOver(data)
                }
    }
}